package com.xinhua.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xinhua.domain.City;
import com.xinhua.domain.Parent;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
public interface CityMapper extends BaseMapper<Parent> {

    @Select(" select city_id id,city from parent_city pc join citys c on pc.city_id=c.` id`  and pc.parent_id=#{id} ")
    List<City> findById(Integer id);
}
